<template>
	<div class="order">
		<Loading></Loading>
		<OrderHead @ChangeshowBlak='ChangeshowBlak'></OrderHead>
		<OrderList :showBlak='showBlak'></OrderList>
		<BottomNav topage=2></BottomNav>
	</div>
</template>

<script>
// 引入公共子组件——底部
import BottomNav from '../default/BottomNav';
import OrderHead from './pages/OrderHead';
import OrderList from './pages/OrderList';
//加载中弹窗
import Loading from '../default/Loading';
import {mapGetters} from 'vuex';

export default{
	name:'Order',
	data(){
		return {
			showBlak:false
		}
	},
	components:{
		Loading,
		OrderHead,
		OrderList,
		BottomNav
	},
	computed:{
		...mapGetters(['hasOnline'])
	},
	created() {
		//判断是否在线，未在线跳转登录页
		if(!this.hasOnline)this.$router.push({path:'/login',query:{jump:'order'}});
	},
	methods:{
		ChangeshowBlak(){
			this.showBlak = !this.showBlak
		},
	},
	
}
</script>

<style scoped>
aside{
	text-align: center;
	font-size: 3rem;
	line-height: 8rem;
}
</style>
